#ifndef _STATE_HPP_
#define _STATE_HPP_

#include <string>

extern "C"
{
#include <rtthread.h>
}


typedef enum
{
    state_status_ok,
    state_status_fail,
    state_status_none,
    state_status_not_init,
    state_status_init_ok,
    state_status_init_fail,
    state_status_runing,
    state_status_warning,
    state_status_device_offline
} state_status;

class STATE
{
private:
    std::string state_name;
    state_status system_status;
    rt_mutex_t data_lock;
    state_status init_flag;

public:

    STATE(std::string state_name);
    ~STATE();

    state_status STATE_get_system_status();
    state_status STATE_set_system_status(state_status set_value);
    state_status STATE_read_init_status();

};

#endif /* _STATE_HPP_ */
